package com.demo.provider.controller;

import com.demo.provider.controller.apm.ApmDeomController;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.client.RestTemplate;

@RestController
public class GetDemoInfo {

    private static final Logger log = LoggerFactory.getLogger(ApmDeomController.class);

    @Autowired
    RestTemplate restTemplate;

    @GetMapping("demoinfo")
    public String demoInfo() {

        log.info("/demoinfo 调用http://demo-consumer/instance/info");
        return restTemplate.getForObject("http://demo-consumer/instance/info", String.class);
    }

}
